/*
 * Filename: g:\espidf_workspace\idf_S3_T-Watch\main\audio\adf_service.h
 * Path: g:\espidf_workspace\idf_S3_T-Watch\main\audio
 * Created Date: Monday, June 30th 2025, 1:53:53 pm
 * Author: sss
 *
 * Copyright (c) 2025 Your Company
 */
#pragma once
#include <stdint.h>

class ADF_SERVICE
{
public:
    int volume = 0;


    static ADF_SERVICE& get_instance(){
        static ADF_SERVICE instance;
        return instance;
    }
    ADF_SERVICE(const ADF_SERVICE&) = delete;
    ADF_SERVICE& operator=(const ADF_SERVICE&) = delete;


    void play_tts(const char* text);
    void play_file(const char* file_path);
    void play_url(const char* url);
    void play_pcm_stream(uint8_t *data, int len);
    void stop_play();
    void pause_play();
    void resume_play();
    void set_volume(int volume);

    void run_vad();
    void stop_vad();

private:
    ADF_SERVICE();
    ~ADF_SERVICE();
    void init();
    void deinit();
    void reset_pipeline();

    bool initialized = false;
};